import requests

# 提交表单数据
# data = {"username": "john", "password": "123456"}
# response = requests.post("https://httpbin.org/post", data=data)
# print(response.json())


# 提交JSON数据
data = {"key": "value"}
response = requests.post(
    "https://httpbin.org/post",
    json=data)  # 自动设置 Content-Type 为 application/json
print(response.status_code)
